package com.hnas.common.outdto;

import com.alibaba.fastjson.JSONObject;

public class InitOrderReturnReceive {

	
	private String amount;//交易金额
	
	private String resultCode;
	
	private String resultMsg;
	
	private String prepayId;
	
	private String cardNo;
	
	private String swiftNumber;//交易流水号
	
	private String payChannel;
	
	public String getPrepayId() {
		return prepayId;
	}

	public void setPrepayId(String prepayId) {
		this.prepayId = prepayId;
	}

	public String getAmount() {
		return amount;
	}

	public void setAmount(String amount) {
		this.amount = amount;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	public String getResultMsg() {
		return resultMsg;
	}

	public void setResultMsg(String resultMsg) {
		this.resultMsg = resultMsg;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getSwiftNumber() {
		return swiftNumber;
	}

	public void setSwiftNumber(String swiftNumber) {
		this.swiftNumber = swiftNumber;
	}
	
	public String getPayChannel() {
		return payChannel;
	}

	public void setPayChannel(String payChannel) {
		this.payChannel = payChannel;
	}

	public InitOrderReturnReceive parseFromJson(String jsonStr){
		JSONObject jsonObject = JSONObject.parseObject(jsonStr);
		this.setAmount(jsonObject.getString("amount"));
		this.setCardNo(jsonObject.getString("cardNo"));
		this.setPrepayId(jsonObject.getString("prepayId"));
		this.setResultCode(jsonObject.getString("resultCode"));
		this.setSwiftNumber(jsonObject.getString("swiftNumber"));
		this.setPayChannel(jsonObject.getString("payChannel"));
		this.setResultMsg(jsonStr);
		return this;
	}
}
